package com.yls.autoapply.util;

import com.yls.autoapply.model.SshConnection;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class ServerUtil {

    private static Map<String, SshConnection> map = new HashMap<>();

    public static SshConnection put(String service) {
        return map.computeIfAbsent(service, k -> new SshConnection(service));
    }

    public static SshConnection get(String service) {
        return map.get(service);
    }

    public static Set<String> getAllkey() {
        return map.keySet();
    }

}
